
'use strict';

var glob = require('glob'),
    _ = require('lodash'),
    path = require('path');

module.exports = function(app) {
    var routesPath = global.AppPath + '/routes/*.js';
    console.log(global.AppPath);
    var routeFiles = glob(routesPath, {
        sync: true
    });

    _.each(routeFiles, function(file) {

        require(path.resolve(file))(app);
        console.log('ooooooooooooo');
    });

};